let x = () => {
    console.log('现在去买菜...');
    let p = new Promise((resolve,reject)=>{
        setTimeout(()=>{
            console.log('买菜完毕!!!');
            resolve();
        },10000)
    })
    return p;
}
let y = async() => {
    console.log('刷锅');
    console.log('准备佐料');
    //遇到await 程序会等待当前函数x执行完毕后,在继续执行--(阻塞)
    await x();
    console.log('开始做饭');
}

y();